package com.dks.mapper;

import com.dks.models.UserCashCoupon;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserCashCouponMapper {

    Integer insert(UserCashCoupon userCashCoupon);

    Integer update(UserCashCoupon userCashCoupon);

    Integer delete(@Param("id") Long id);

    UserCashCoupon select(@Param("id") Long id);

    List<UserCashCoupon> getByMapList(Map<String, Object> map);

    UserCashCoupon getAvailableByUserId(@Param("userId") Long userId, @Param("classHourPackageId") Long classHourPackageId);

    Integer useCashCoupon(Long cashCouponId, Long userId);
}
